package com.fdb.efp.nls.common;

/**
 * 问题类型信息
 * @author chenqiming
 *
 */
public enum TelQuestionType {
    CERT_CODE_LAST4("CERT_CODE_LAST4", "CUS_QUESTION", "身份证号码后四位"),
    CERT_BIRTH("CERT_ID_BIRTH", "CUS_QUESTION", "出生日期:X年X月X日"),
    CERT_ID_ADDRESS("CERT_ID_ADDRESS", "CUS_QUESTION", "户籍地址"),
    CERT_ID_NATION("CERT_ID_NATION", "CUS_QUESTION", "民族"),
    CERT_ID_ORG("CERT_ID_ORG", "CUS_QUESTION", "发证机关"),
    CERT_ID_VALID("CERT_ID_VALID", "CUS_QUESTION", "证件有效期"),
    CERT_ID_OWN("CERT_ID_OWN", "CUS_QUESTION", "证件有效期"),
    CERT_LOAN_USE("CERT_LOAN_USE", "LOAN_QUESTION", "是否本人"),
    ;
    private String key;
    private String type;
    private String desc;
    
    private TelQuestionType(String key, String type, String desc) {
        this.key = key;
        this.type = type;
        this.desc = desc;
    }
    
    public static TelQuestionType parse(String key) {
        for(TelQuestionType questionType : TelQuestionType.values()) {
            if(questionType.key.equals(key)) {
                return questionType;
            }
        }
        return null;
    }

    public String getKey() {
        return key;
    }

    public String getType() {
        return type;
    }

    public String getDesc() {
        return desc;
    }
}
